package com.demo.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.demo.pojo.DTO.DTORoleMenu;
import com.demo.pojo.system.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    @Select("select * from sys_role_menu where role_id = #{roleId}")
    public List<DTORoleMenu> selectRoleMenuById(Integer roleId);
    @Update("update sys_role_menu set is_deleted = #{del} where role_id = #{roleId}")
    public void delAllMenuByRoleId(Integer roleId,int del);


//    @Update("update sys_role_menu set is_deleted = #{del} where id in #{ids}")
    public void setDelIs(@Param(value = "ids") List<Integer> ids, Integer del);



//    @Insert("insert into sys_role_menu ( role_id, menu_id) values (#{roleId},#{needAddRoleMenu2})")
    public void insertRoleMenu(Integer roleId, List<Integer> needAddRoleMenu2);

}
